package com.xiaocg.factory.dd;

import com.xiaocg.factory.Coffee;

public class CoffeeStore2 {

    private CoffeeFactory coffeeFactory;

    public void setCoffeeFactory(CoffeeFactory coffeeFactory) {
        this.coffeeFactory = coffeeFactory;
    }

    public Coffee orderCoffee(){
        Coffee coffer = coffeeFactory.createCoffer();
        coffer.addSugar();
        coffer.addMilk();
        return coffer;
    }
}
